package cn.lizemin.builder.version1;


import cn.lizemin.builder.version1.entity.ResourcePoolConfig;

/**
 * @author lzm
 * @version 1.0
 * @description: 如果不使用建造者模式，todo：这里待补充
 * @date 2022/4/26 10:12
 */
public class Client {

    /**
     * 程序的入口
     */
    public static void main(String[] args) {
//        创建builder对象
        ResourcePoolConfig.Builder resourcePoolConfigBuilder = new ResourcePoolConfig.Builder();
        resourcePoolConfigBuilder.setName("lzm")
                .setMaxIdle(8)
                .setMinIdle(9)
                .setMaxTotal(1);
//        通过builder对象的方法利用ResourcePoolConfig的私有构造器创建对象
        ResourcePoolConfig resourcePoolConfig = resourcePoolConfigBuilder.build();
//        System.out.println(resourcePoolConfig.getMaxIdle());


    }


}
